package top.lixunda.ecommerce.server.user.api.entity.db;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * VIEW
 * </p>
 *
 * @author Lixunda
 * @since 2020-04-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user_permission")
@ApiModel(value="UserPermissionDO对象", description="VIEW")
public class UserPermissionDO extends Model<UserPermissionDO> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "官方用户唯一账户")
    @TableField("account")
    private Integer account;

    @ApiModelProperty(value = "用户类型，如管理员，店铺用户，普通用户")
    @TableField("user_type")
    private String userType;

    @ApiModelProperty(value = "分配编号，唯一主键")
    @TableField("permission_id")
    private Integer permissionId;

    @ApiModelProperty(value = "权限编号，真正的权限判定标志，不能重复")
    @TableField("permission_code")
    private String permissionCode;

    @ApiModelProperty(value = "权限名称，只是用来查看")
    @TableField("permission_name")
    private String permissionName;

    @ApiModelProperty(value = "权限描述")
    @TableField("permission_desc")
    private String permissionDesc;

    @ApiModelProperty(value = "权限分配编号，唯一主键")
    @TableField("allot_id")
    private Integer allotId;

    @ApiModelProperty(value = "分配对象，用户，角色，菜单")
    @TableField("allot_part")
    private String allotPart;

    @ApiModelProperty(value = "对象编号，用户编号，角色ID，菜单ID")
    @TableField("part_id")
    private Integer partId;

    @ApiModelProperty(value = "分配模式，手动分配和自动分配")
    @TableField("allot_mode")
    private String allotMode;


    @Override
    protected Serializable pkVal() {
        return null;
    }

}
